package com.saumya.robotlegs.view
{
	import com.saumya.robotlegs.events.ApplicationStartEvent;
	
	import flash.events.MouseEvent;
	
	import org.robotlegs.mvcs.Mediator;

	public class IntroViewMediator extends Mediator
	{
		[Inject]
		public var introView:IntroView;
		
		public function IntroViewMediator()
		{
			//Constructor
			//Does Nothing, can be removed all together
		}
		
		public override function onRegister():void
		{
			//listen to view
			this.eventMap.mapListener(this.introView.startBtn,MouseEvent.CLICK,onStartBtnClick,MouseEvent);
			//listen to context
			
		}
		
		private function onStartBtnClick(e:MouseEvent):void
		{
			var evt:ApplicationStartEvent=new ApplicationStartEvent(ApplicationStartEvent.BEGIN);
			this.dispatch(evt);
		}
		
	}
}